class Solution(object):
    def minOperations(self, logs):
        c = 0
        for l in logs:
            t = l.split('/')[0]
            if t == '..':
                c = max(0, c - 1)
            else:
                if t == '.':
                    c = c
                else:
                    c += 1
        return c